<template>
  <div>
    <h2>我是用户界面</h2>
    <p>一线姻缘一线牵，月老红线在身边。</p>
    <hr />
    <span>
      <h3>当前用户：</h3>
      {{ userId }}
    </span>
    <button @click="btnRouter">router</button>
  </div>
</template>

<script>
export default {
  name: "User",

  computed: {
    userId() {
      return this.$route.params.userId;
    },
  },

  methods: {
    btnRouter() {
      console.log("[router] User.vue >>>", this.$router);
    },
  },
};
</script>

<style scoped>
</style>